package dbms;

import java.util.Date;

public class Transaction {
	private String TransaktionID;
	
	public String getTransaktionID() {
		return TransaktionID;
	}

	/*
	 * TransaktionID is combination of time & login User + (optional)SessionName
	 */
	public Transaction(String SessionName) {
		String userName = System.getProperty("user.name");
		Date date = new Date();
		String time = Long.toString(date.getTime());
		
		TransaktionID = userName + time + SessionName;
		
	}
	
	public Transaction() {
		String userName = System.getProperty("user.name");
		Date date = new Date();
		String time = Long.toString(date.getTime());
		
		TransaktionID = userName + time;
	}
	
	
	

}
